package com.zbkj.crmeb.agent.model;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import java.util.Date;
import com.baomidou.mybatisplus.annotation.TableId;
import java.io.Serializable;
import java.util.List;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 服务商表
 * </p>
 *
 * @author wuzp
 * @since 2022-02-15
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("eb_agent")
@ApiModel(value="Agent对象", description="服务商表")
public class Agent extends Model<Agent> {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "服务商id")
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty(value = "上级id (0:平台)")
    private Integer parentId;

    @ApiModelProperty(value = "服务商名称")
    private String agentName;

    @ApiModelProperty(value = "联系人")
    private String contactPerson;

    @ApiModelProperty(value = "联系电话")
    private String contactPhone;

    @ApiModelProperty(value = "可见品牌")
    private String brandIds;

    @ApiModelProperty(value = "可见供应商")
    private String suppliersIds;

    @ApiModelProperty(value = "运费模板id(1:大陆 2:港澳 3:意大利)")
    private String tempId;

    @ApiModelProperty(value = "是否显示供应商(0:不显示  1:显示)")
    private Integer isShowSupplier;

    @ApiModelProperty(value = "是否删除(0：未删除；1：删除)")
    private Integer isDel;

    @ApiModelProperty(value = "上级加价率")
    private Integer ratio;

    @ApiModelProperty(value = "创建时间")
    private Date createTime;

    @ApiModelProperty(value = "修改时间")
    private Date updateTime;

    @ApiModelProperty(value = "二级服务商列表")
    @TableField(exist = false)
    private List<Agent> secondAgentList;

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
